#
#  Copyright 2010 Andrew Kroh
#
#  Kroh-IO is free software: you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation, either version 3 of the License, or
#  (at your option) any later version.
#
#  Kroh-IO is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.
#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#

import os
import sys

# Import the environment variables from calling script:
Import('env', 'LIB_KROHIO_INCLUDE_DIR', 'NATIVE_DIST_DIR')
Import('BIN_TEST_SRC_DIR')


# Clone the environment so changes 
# cannot affect global build env:
krohio_env = env.Clone()

krohio_env.Append(CPPPATH = [LIB_KROHIO_INCLUDE_DIR])

SOURCES = Glob(os.path.join(Dir(BIN_TEST_SRC_DIR).path, '*.c'))

# Create the shared library:
krohio_env.Program('test_krohio', SOURCES, LIBS=['krohio'], LIBPATH=NATIVE_DIST_DIR + '/lib')
